package fr.miage.ageco.dataaccess.services;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import fr.miage.ageco.dataaccess.bo.Employe;
import fr.miage.ageco.dataaccess.mappers.EmployeMapper;

@Service
@Transactional
public class EmployeService {

	@Autowired
	private EmployeMapper employeMapper;

	@Transactional
	public Employe getEmploye(int id) {
		return employeMapper.getEmploye(id);
	}

	@Transactional
	public List<Employe> getAllEmploye() {
		return employeMapper.getAllEmployes();
	}
	
	@Transactional
	public int insertEmploye(Employe employe) {
		return employeMapper.insertEmploye(employe);
	}
	
	@Transactional
	public int updateEmploye(Employe employe) {
		return employeMapper.updateEmploye(employe);
	}
	
	@Transactional
	public int deleteEmploye(Employe employe) {
		return employeMapper.deleteEmploye(employe);
	}
	
}
